package com.stone.design.patterns.singleton;

/**
 * @author Stone
 * @version V1.0
 * @description: 单例模式
 * 私有化构造器 通过静态方法实例化对象
 * @date 4/12/18 20:47
 * @email redsstone@163.com
 */
public class Singleton {

    private static Singleton mSingleton;

    private Singleton() {}

    public static synchronized Singleton getInstance() {

        if (mSingleton == null) {
            mSingleton = new Singleton();
        }
        return mSingleton;
    }

}
